﻿<!--产生权限相关的指定用户隐藏域-->
@model ElingOA6_Admin_DSJCJ.Areas.Admin.Models.DocumentClsViewModel
@GenerateHidden()
@helper GenerateHidden()
    {
        //发布指定用户
        var tmpList = Model.DocClsAuthorityList.Where(s => s.FPronoun == "PERSON" && s.FAuthorityType == "PUB").ToList();
        List<ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel> objList = new List<ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel>();
        if (tmpList.Count > 0)
        {
            foreach (ElingOA6_Admin_DSJCJ.Model.DocClsAuthority docClsAuthorityModel in tmpList)
            {
                objList.Add(new ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel() { Text = docClsAuthorityModel.AllName, Value = docClsAuthorityModel.FSourceNo });
            }
    @Html.Hidden("hdSelPubUserKeys", Newtonsoft.Json.JsonConvert.SerializeObject(objList));
        }
        else
        {
    @Html.Hidden("hdSelPubUserKeys", "");
        }
        //维护指定用户
        tmpList = Model.DocClsAuthorityList.Where(s => s.FPronoun == "PERSON" && s.FAuthorityType == "MANAGE").ToList();
        objList = new List<ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel>();
        if (tmpList.Count > 0)
        {
            foreach (ElingOA6_Admin_DSJCJ.Model.DocClsAuthority docClsAuthorityModel in tmpList)
            {
                objList.Add(new ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel() { Text = docClsAuthorityModel.AllName, Value = docClsAuthorityModel.FSourceNo });
            }
    @Html.Hidden("hdSelManageUserKeys", Newtonsoft.Json.JsonConvert.SerializeObject(objList));
        }
        else
        {
    @Html.Hidden("hdSelManageUserKeys", "");
        }
        //审核指定用户
        tmpList = Model.DocClsAuthorityList.Where(s => s.FPronoun == "PERSON" && s.FAuthorityType == "AUDIT").ToList();
        objList = new List<ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel>();
        if (tmpList.Count > 0)
        {
            foreach (ElingOA6_Admin_DSJCJ.Model.DocClsAuthority docClsAuthorityModel in tmpList)
            {
                objList.Add(new ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel() { Text = docClsAuthorityModel.AllName, Value = docClsAuthorityModel.FSourceNo });
            }
    @Html.Hidden("hdSelAuditUserKeys", Newtonsoft.Json.JsonConvert.SerializeObject(objList));
        }
        else
        {
    @Html.Hidden("hdSelAuditUserKeys", "");
        }
        //查看指定用户
        tmpList = Model.DocClsAuthorityList.Where(s => s.FPronoun == "PERSON" && s.FAuthorityType == "LOOK").ToList();
        objList = new List<ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel>();
        if (tmpList.Count > 0)
        {
            foreach (ElingOA6_Admin_DSJCJ.Model.DocClsAuthority docClsAuthorityModel in tmpList)
            {
                objList.Add(new ElingOA6_Admin_DSJCJ.Areas.Admin.Models.CommonValueModel() { Text = docClsAuthorityModel.AllName, Value = docClsAuthorityModel.FSourceNo });
            }
    @Html.Hidden("hdSelLookUserKeys", Newtonsoft.Json.JsonConvert.SerializeObject(objList));
        }
        else
        {
    @Html.Hidden("hdSelLookUserKeys", "");
        }
}